import type { ElementPlusInfoType } from '@/types/elementPlus'

export interface RecruitInterviewStatusOption {
  label: string
  value: string
  tagType: ElementPlusInfoType | ''
  panelName: string
  showPanel: boolean
  icon: string
}

export const INTERVIEW_STATUS_OPTIONS: RecruitInterviewStatusOption[] = [
  {
    label: '待登记',
    value: '0',
    tagType: 'info',
    panelName: '邀约登记',
    showPanel: true,
    icon: 'ep:document-add'
  },
  {
    label: '未登记',
    value: '6',
    tagType: 'info',
    panelName: '未登记',
    showPanel: false,
    icon: 'ep:document-remove'
  },
  {
    label: '待面试',
    value: '1',
    tagType: 'warning',
    panelName: '到面未跟进',
    showPanel: true,
    icon: 'ep:calendar'
  },
  {
    label: '面试不通过',
    value: '2',
    tagType: 'danger',
    panelName: '面试不通过',
    showPanel: false,
    icon: 'ep:close-bold'
  },
  {
    label: '待定',
    value: '7',
    tagType: 'warning',
    panelName: '待定',
    showPanel: false,
    icon: 'ep:timer'
  },
  {
    label: '待入职',
    value: '3',
    tagType: 'warning',
    panelName: '待入职',
    showPanel: true,
    icon: 'ep:suitcase'
  },
  {
    label: '未入职',
    value: '4',
    tagType: 'danger',
    panelName: '未入职',
    showPanel: false,
    icon: 'ep:warning-filled'
  },
  {
    label: '已入职',
    value: '5',
    tagType: 'success',
    panelName: '已入职',
    showPanel: false,
    icon: 'ep:circle-check'
  }
]

export const findInterviewStatus = (status?: string) => {
  if (!status && status !== '0') {
    return undefined
  }
  return INTERVIEW_STATUS_OPTIONS.find((item) => item.value === status)
}
